# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-cssselect
_pkgname=cssselect
pkgver=1.1.0
pkgrel=7
pkgdesc='Parses CSS3 Selectors and translates them to XPath 1.0.'
url='https://pypi.org/project/cssselect/#files'
arch=('any')
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('98ce8233ef7486bb240ec55f0d07aff684c08376b301a2e8cbc0579515f204b56b1ed2cc7106bd7afac59a7286165ec87d73cf0db74e5741fed7b2ddfa04b544')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

